package com.lbj.mvvm.network

class AppException : Exception {
    var errorMsg: String
    var errCode: Int = 0

    constructor(errCodeInput: Int,error: String?) : super(error) {
        errorMsg = error ?: "请求失败，请稍后再试"
        errCode = errCodeInput
    }

    constructor(error: Error) {
        errCode = error.getKey()
        errorMsg = error.getValue()
    }
}